﻿<%@ Control Language="C#" AutoEventWireup="true" CodeFile="ShopCart.ascx.cs" Inherits="UserControl_ShopCart" %>
<div id="shop">
                        
                          <div id="div-order">
                          <p class="header">Danh sách sản phẩm : </p>
                          <div class="gridView">
                            <asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="False" 
                              BackColor="White" BorderColor="White" BorderStyle="Ridge" BorderWidth="2px" 
                              CellPadding="3" EnableModelValidation="True" Width="100%" CellSpacing="1" 
                              GridLines="None" 
                              EmptyDataText="Chưa có sản phẩm nào trong giỏ hàng của bạn !">
                              <Columns>
                                <asp:TemplateField HeaderText="Chọn">
                                  <ItemTemplate>
                                    <asp:CheckBox ID="CheckBox1" runat="server" />
                                  </ItemTemplate>
                                  <ItemStyle HorizontalAlign="Center" />
                                </asp:TemplateField>
                                <asp:ImageField HeaderText="Hình ảnh" DataImageUrlField="Image" 
                                  DataImageUrlFormatString="~/Images/Product/{0}">
                                  <ControlStyle Height="30px" />
                                  <ItemStyle Height="30px" HorizontalAlign="Center" />
                                </asp:ImageField>
                                <asp:BoundField HeaderText="Mã SP" DataField="Id" >
                                <ItemStyle HorizontalAlign="Center" />
                                </asp:BoundField>
                                <asp:BoundField HeaderText="Tên sản phẩm" DataField="Name" >
                                <ItemStyle HorizontalAlign="Center" />
                                </asp:BoundField>
                                <asp:BoundField HeaderText="Đơn giá" DataField="Cost" >
                                <ItemStyle HorizontalAlign="Center" />
                                </asp:BoundField>
                                <asp:TemplateField HeaderText="Số lượng">
                                  <ItemTemplate>
                                    <asp:TextBox ID="TextBox1" runat="server" Width="60px" Text='<%# Eval("Quantity") %>' />
                                  </ItemTemplate>
                                  <ItemStyle HorizontalAlign="Center" />
                                </asp:TemplateField>
                                <asp:BoundField HeaderText="Thành tiền" DataField="TotalCost" >
                                <ItemStyle HorizontalAlign="Center" />
                                </asp:BoundField>
                              </Columns>
                              <FooterStyle BackColor="#C6C3C6" ForeColor="Black" />
                              <HeaderStyle BackColor="#9B9B9B" Font-Bold="True" ForeColor="#494949" 
                                Height="25px" />
                              <PagerStyle BackColor="#C6C3C6" ForeColor="Black" HorizontalAlign="Right" />
                              <RowStyle ForeColor="Black" BackColor="#DEDFDE" Height="30px" />
                              <SelectedRowStyle BackColor="#9471DE" Font-Bold="True" ForeColor="White" />
                            </asp:GridView>
                          </div><!-- End .gridView -->                           
                          <div style="margin: 5px 0px">         
                          <table style="width: 100%">
                            <tr>
                              <td align="left">
                              <asp:Button ID="btnBack" CssClass="button" runat="server" 
                                  Text="Quay lại mua hàng" onclick="btnBack_Click" />&nbsp;&nbsp;
                              <asp:Button ID="btnSend" CssClass="button"  runat="server" 
                                  Text="Gửi đơn đặt hàng" onclick="btnSend_Click" />
                              </td>
                              <td align="right">
                                <asp:Button ID="btnDel" CssClass="button"  runat="server" Text="Xóa chọn" 
                                  onclick="btnDel_Click" />&nbsp;&nbsp;
                                <asp:Button ID="btnUpdate" CssClass="button"  runat="server" 
                                  Text="Cập nhật giỏ hàng" onclick="btnUpdate_Click" />
                              </td>
                            </tr>
                          </table>     
                          <div style="margin-top: 5px">
                             <p>Tổng tiền : <font style="color:#C10059; font-weight:bold"><asp:Literal ID="ltTongTien" runat="server" Text="0 vnđ" /></font></p>
                           <p>Bằng chữ :  <font style="color:#C10059; font-weight:bold"><asp:Literal ID="ltTongTienChu" runat="server" Text="0 đồng" /></font></p>  
                          </div>     
                          </div>
                          <div id="divOrder" class="div-order" visible="false" runat="server">
                            <fieldset class="buy">
                              <legend>Gửi đơn đặt hàng</legend>
                              <table style="width: 100%">
                                <tr>
                                  <td style="width: 80px">Họ tên : </td>
                                  <td>
                                    <asp:TextBox runat="server" ID="txtName" Width="400px" /></td>
                                </tr>
                                <tr>
                                  <td style="width: 80px">Địa chỉ : </td>
                                  <td>
                                    <asp:TextBox runat="server" ID="txtAddress" Width="400px" /></td>
                                </tr>
                                <tr>
                                  <td style="width: 80px">Điện thoại : </td>
                                  <td>
                                    <asp:TextBox runat="server" ID="txtPhone" Width="400px" /></td>
                                </tr>
                                <tr>
                                  <td style="width: 80px">Email : </td>
                                  <td>
                                    <asp:TextBox runat="server" ID="txtEmail" Width="400px" /></td>
                                </tr>
                                <tr>
                                  <td valign="top" style="width: 80px">Ghi chú : </td>
                                  <td>
                                    <asp:TextBox runat="server" ID="txtNotes" Width="400px" TextMode="MultiLine" Rows="12" /></td>
                                </tr>
                                <tr>
                                  <td>&nbsp;</td>
                                  <td>
                                    <asp:Button CssClass="button" ID="btnOk" runat="server" Text=" Gửi " 
                                      onclick="btnOk_Click" />&nbsp;&nbsp;
                                     <input id="btnReset" runat="server" type="reset" class="button" value=" Nhập lại " />
                                  </td>
                                </tr>
                                <tr>
                                  <td colspan="2">
                                    <asp:Literal ID="ltThongBao" runat="server" />
                                  </td>
                                </tr>
                              </table>
                            </fieldset>
                          </div>
                           </div><!-- End div-order -->
</div>